package ldh.im.base.pojo;

import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @author: ldh
 * @date: 2021-06-06 10:17:42
 * @Description: 部门
 */

@Data
public class Department  {


	/**
	 * 主键
	 */
	private Long id;

	/**
	 * 部门名称
	 */
	private String name;

	private String code;

	/**
	 * 上级部门id
	 */
	private Long parentId;
	private Department parent;
	private List<Department> children;
	private Boolean open;

	/**
	 * 租户id
	 */
	private String tenantCode;
	private Tenant tenant;

	/**
	 * 创建时间
	 */
	private Date createTime;

	/**
	 * 更新时间
	 */
	private Date updateTime;


	public void setTenant(Tenant tenant) {
		this.tenantCode = tenant.getShortCode();
	}
	
}

